package com.bgs.travelapp.scenicRank.controller;

import com.bgs.travelapp.scenicRank.service.ScenicRankService;
import com.bgs.travelapp.result.CommonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 前端---景区排行
 * gpd 2022-08-23 08点41分
 */
@RestController
@CrossOrigin
@RequestMapping("/scenicRank")
public class ScenicRankController {

    @Resource
    ScenicRankService scenicRankService;

    /**
     * 查询景区排行
     * 前端---景区排行
     * todo 白
     * gpd 2022-08-23 08点40分
     * @return
     */
    @GetMapping("/getRanking")
    public CommonResult getRanking(){
        return scenicRankService.getRanking();
    }
}
